package com.star.service.impl;

import com.star.entry.Enterprise;
import com.star.mapper.EnterpriseMapper;
import com.star.pojo.PostEnterprise;
import com.star.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@SuppressWarnings("all")
@Service
public class EnterpriseServiceImpl implements EnterpriseService {
    @Autowired
    private EnterpriseMapper enterpriseMapper;
    @Override
    public boolean changeFollow(Enterprise enterprise) {
        return enterpriseMapper.changeFollow(enterprise)==1?true:false;
    }

    @Override
    public Enterprise selectById(int id) {
        return enterpriseMapper.selectById(id).get(0);
    }

    @Override
    public ArrayList<PostEnterprise> selectByName(String name) {
        return enterpriseMapper.selectByName(name);
    }

}
